﻿using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.Logging;
using LaserMark.Logging;

namespace Microsoft.Extensions.DependencyInjection
{
    public static class LoggerBuilderExtension
    {

        public static ILoggingBuilder AddFileLogger(this ILoggingBuilder builder)
        {
            builder.ClearProviders();
            builder.Services.TryAddScoped<ILogger, FileLogger>();
            builder.Services.TryAddScoped<ILoggerProvider, FileLoggerProvider>();
            return builder;
        }
    }
}
